var mysql  = require('mysql');
const database=require('./database')   
var connections= mysql.createPool(database); 
function query(sql,callback){
    connections.getConnection(function(err,connection){
        if (err) throw err;
        connection.query(sql,function(err,rows){
            callback(err,rows);
            connection.release();
        })
    })
}
module.exports = query;


